package com.zhj.interview;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author zhj
 */
public class Test29 {

    private static ReentrantLock lock = new ReentrantLock();

    public static void main(String[] args) throws InterruptedException {
        Condition condition1 = lock.newCondition();
        Condition condition2 = lock.newCondition();

        lock.unlock();
        // 等待
        condition1.await();

        // 唤醒
        condition1.signal();
        condition1.signalAll();
    }
}
